package com.itdlc.android.library.utils;

import android.content.Context;
import android.content.SharedPreferences;

public class SPUtil {
    private static SharedPreferences sp;

    public SPUtil() {
    }

    public static void initSP(Context context, String spName) {
        sp = context.getSharedPreferences(spName, 0);
    }

    public static String getSharedString(String key) {
        return sp.getString(key, (String)null);
    }

    public static void setSharedString(String key, String value) {
        SharedPreferences.Editor editor = sp.edit();
        editor.putString(key, value);
        editor.commit();
    }
}
